package com.cloudbroker.bcs.platform.ltb.middle.bizservice.impl;

import com.cloudbroker.bcs.common.context.RuntimeContext;
import com.cloudbroker.bcs.common.zookeeper.ZooKeeperClient;

/**
 * Created by lili19289 on 2016/8/15.
 */
public class BlackWordZK {

    private static  ZooKeeperClient client;

    private static int i=0;

    public static void init(){
        client = RuntimeContext.getBean(ZooKeeperClient.class);;
        client.start();
        if(!client.exists("/admin")){
            client.create("/admin");
        }
        if(!client.exists("/admin/blackword")){
            client.create("/admin/blackword");
        }
    }

    public static void changeBlackWord(String company_id){
        client.setData("/admin/blackword",company_id);
    }


}
